package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 动态帖子实体
 *
 * 说明：images/tags 以逗号分隔进行存储，服务层会转换为数组给前端使用
 */
@ApiModel(value = "Posts", description = "动态帖子实体")
@Data
public class Posts{
    private static final long serialVersionUID = 1L;

    @Excel(name = "ID")
    @ApiModelProperty(value = "主键ID")
    private Long id;

    @Excel(name = "用户ID")
    @ApiModelProperty(value = "发布用户ID", required = true)
    private String userId;

    @Excel(name = "内容")
    @ApiModelProperty(value = "帖子内容", required = true)
    private String contentText;

    @Excel(name = "标签")
    @ApiModelProperty(value = "标签列表（分号分隔）")
    private String tags;

//    @Excel(name = "位置")
//    @ApiModelProperty(value = "位置信息")
//    private String location;

    @Excel(name = "可见范围")
    @ApiModelProperty(value = "可见范围：1公开/2好友/3私密", required = true)
    private Integer visibility;

    @Excel(name = "状态")
    @ApiModelProperty(value = "状态：0正常/1违规/2已删除/3待审核")
    private Integer status;

    @Excel(name = "点赞")
    @ApiModelProperty(value = "点赞数量")
    private Integer likeCount;

    @Excel(name = "评论")
    @ApiModelProperty(value = "评论数量")
    private Integer commentCount;

    @Excel(name = "分享")
    @ApiModelProperty(value = "分享数量")
    private Integer shareCount;

//    @Excel(name = "打赏次数")
//    @ApiModelProperty(value = "打赏次数")
//    private Integer rewardCount;

    @Excel(name = "打赏金额")
    @ApiModelProperty(value = "打赏总金额")
    private BigDecimal rewardAmount;

    @Excel(name = "置顶")
    @ApiModelProperty(value = "是否置顶")
    private Boolean isTop;

    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;

    @Excel(name = "审核原因")
    @ApiModelProperty(value = "审核原因")
    private String auditReason;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updatedAt;

    @ApiModelProperty(value = "修改人")
    private String updateBy;

    @ApiModelProperty(value = "媒体类型：1图片/2视频")
    private Integer mediaType;

    @ApiModelProperty("用户名")
    private String userName;
    @ApiModelProperty("用户头像")
    private String avatar;

}
